<?php
/**
 *
 *
 */
namespace Yz\modules\Generic;

class Controller_List
    extends \Yz_Controller_Templated
    implements \Yz_Controller_Interface
{


    /**
     *
     */
    protected function doGET()
    {
        debug();
        $model = $this->module->selectModel("List");
        $list = $model->fetchList();


        if (0 === $list->count()) {
            $template = $this->selectTemplate('no-items');
        } else {
            $template = $this->selectTemplate();
            $template->list = $list;
        }


        return $this->outputTemplate($template);
    }

}
